from django.db import models

# Create your models here.


class Movie(models.Model):
    showname = models.CharField(max_length=64)
    shownameen = models.CharField(max_length=128)
    director = models.CharField(max_length=64)
    leadingRole = models.CharField(max_length=256)
    type = models.CharField(max_length=64)
    country = models.CharField(max_length=64)
    language = models.CharField(max_length=64)
    duration = models.IntegerField(default=90)
    openday = models.DateTimeField()
    poster = models.CharField(max_length=256)
    orderCount = models.IntegerField(default=0)
    showVersion = models.CharField(max_length=32)
    flag = models.SmallIntegerField(default=0) # 0-未上映 1-上映

    class Meta:
        db_table = 'movie'

    def __str__(self):
        return self.showname

